﻿/* —— 1. 注册可动画的颜色变量 —— */
@property --stripe-light {
    syntax: '<color>';
    inherits: false;
    initial-value: #000; /* 起始颜色（反转后为白） */
}

@property --stripe-dark {
    syntax: '<color>';
    inherits: false;
    initial-value: #333; /* 起始颜色（反转后为浅灰） */
}

.liquid-bg {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #000;
    overflow: hidden;
    filter: grayscale(1) invert(1);
}

    .liquid-bg::before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 50%;
        width: 100%;
        background: repeating-linear-gradient( to right, var(--stripe-light) 0 2px, var(--stripe-dark) 2px 4px, var(--stripe-light) 4px 22px );
        transform: translateX(-50%) scaleX(1);
        transform-origin: center;
        mix-blend-mode: exclusion;
        animation: stripeExpand 4.5s ease-out forwards, stripeColor 12s linear infinite; /* 减慢动画速度 */
    }
/* —— 3. 颜色关键帧：先浅→深→浅 —— */
@keyframes stripeColor {
    0% {
        --stripe-light: #000; /* 反转后为纯白 */
        --stripe-dark: #333; /* 反转后为浅灰 */
    }

    60% {
        --stripe-light: #fff; /* 反转后为纯黑 */
        --stripe-dark: #ccc; /* 反转后为深灰 */
    }
    100% {
        --stripe-light: #000; /* 反转后为纯白 */
        --stripe-dark: #333; /* 反转后为浅灰 */
    }
}

/* —— 4. 展开关键帧 —— */
@keyframes stripeExpand {
    0% {
        transform: translateX(-50%) scaleX(0);
        opacity: 1;
    }

    50% {
        transform: translateX(-50%) scaleX(1);
        opacity: 0.6;
    }

    100% {
        transform: translateX(-50%) scaleX(1);
        opacity: 0.8;
    }
}

/* —— 5. 留白遮罩 & 内容层 —— */
.liquid-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient( 90deg, rgba(255,255,255,0.8) 0%, rgba(200,200,200,0.5) 20%, rgba(100,100,100,0.3) 40%, rgba(0,0,0,0.1) 60%, rgba(100,100,100,0.3) 80%, rgba(200,200,200,0.5) 100% );
    background-size: 200% 100%;
    mix-blend-mode: overlay;
    animation: gradientFlow 6s linear infinite;
    opacity: 0.8;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%
    }
}

.typewriter h1 {
    font-family: 'Fira Code', Consolas, monospace;
    overflow: hidden; /* 隐藏溢出文本 */
    border-right: .15em solid orange; /* 光标 */
    white-space: nowrap; /* 单行显示 */
    margin: 0 auto; /* 居中 */
    letter-spacing: .15em; /* 字符间距 */
    animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
    color: none;
}

/* 打字动画：宽度从 0 到 100% */
@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

/* 光标闪烁动画 */
@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }

    50% {
        border-color: orange;
    }
}


.content-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.login-btn {
    padding: .75rem 1.5rem;
    font-size: 1.25rem;
    background: #fff;
    color: #000;
    border: 2px solid #d0d0d0;
    border-radius: .5rem;
    transition: transform .2s, box-shadow .2s;
}

    .login-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 0 1rem rgba(255,255,255, .5);
    }


/* 圆形涟漪 */

.liquid-bg-circle {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #000;
    overflow: hidden;
    filter: grayscale(1) invert(1);
}


    .liquid-bg-circle::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 20vmin;
        height: 20vmin;
        border: 2px solid #fff;
        border-radius: 50%;
        transform: translate(-50%, -50%) scale(0);
        mix-blend-mode: exclusion;
        animation: ripple 3s ease-out infinite;
    }

    /* 第二个涟漪，错开 1.5s，形成持续波纹 */
    .liquid-bg-circle::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 20vmin;
        height: 20vmin;
        border: 2px solid #fff;
        border-radius: 50%;
        transform: translate(-50%, -50%) scale(0);
        mix-blend-mode: exclusion;
        animation: ripple 3s ease-out infinite 1.5s;
    }

/* 涟漪关键帧：放大 + 淡出 */
@keyframes circleripple {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(4);
        opacity: 0;
    }
}